using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Hydrology
{
    /// <summary>
    /// <para>Snap Pour Point</para>
    /// <para>Snaps pour points to the cell of highest flow accumulation within a specified distance.</para>
    /// <para>捕捉将点倾倒到指定距离内流量积累最高的像元。</para>
    /// </summary>    
    [DisplayName("Snap Pour Point")]
    public class SnapPourPoint : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SnapPourPoint()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_pour_point_data">
        /// <para>Input raster or feature pour point data</para>
        /// <para><xdoc>
        ///   <para>The input pour point locations that are to be snapped.</para>
        ///   <para>For a raster input, all cells that are not NoData (that is, have a value) will be considered pour points and will be snapped.</para>
        ///   <para>For a point feature input, this specifies the locations of cells that will be snapped.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要捕捉的输入倾倒点位置。</para>
        ///   <para>对于栅格输入，所有不是 NoData（即具有值）的像元都将被视为倾倒点，并将被捕捉。</para>
        ///   <para>对于点要素输入，这将指定要捕捉的像元的位置。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_accumulation_raster">
        /// <para>Input accumulation raster</para>
        /// <para><xdoc>
        ///   <para>The input flow accumulation raster.</para>
        ///   <para>This can be created with the Flow Accumulation tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入流累积栅格。</para>
        ///   <para>这可以使用流量累积工具创建。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output pour point raster where the original pour point locations have been snapped to locations of higher accumulated flow.</para>
        ///   <para>This output is of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出倾点栅格，其中原始倾点位置已捕捉到累积流量较高的位置。</para>
        ///   <para>此输出为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_snap_distance">
        /// <para>Snap distance</para>
        /// <para>Maximum distance, in map units, to search for a cell of higher accumulated flow.</para>
        /// <para>最大距离（以地图单位表示），用于搜索累积流量较高的像元。</para>
        /// </param>
        public SnapPourPoint(object _in_pour_point_data, object _in_accumulation_raster, object _out_raster, double _snap_distance)
        {
            this._in_pour_point_data = _in_pour_point_data;
            this._in_accumulation_raster = _in_accumulation_raster;
            this._out_raster = _out_raster;
            this._snap_distance = _snap_distance;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Snap Pour Point";

        public override string CallName => "sa.SnapPourPoint";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_pour_point_data, _in_accumulation_raster, _out_raster, _snap_distance, _pour_point_field];

        /// <summary>
        /// <para>Input raster or feature pour point data</para>
        /// <para><xdoc>
        ///   <para>The input pour point locations that are to be snapped.</para>
        ///   <para>For a raster input, all cells that are not NoData (that is, have a value) will be considered pour points and will be snapped.</para>
        ///   <para>For a point feature input, this specifies the locations of cells that will be snapped.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要捕捉的输入倾倒点位置。</para>
        ///   <para>对于栅格输入，所有不是 NoData（即具有值）的像元都将被视为倾倒点，并将被捕捉。</para>
        ///   <para>对于点要素输入，这将指定要捕捉的像元的位置。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or feature pour point data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_pour_point_data { get; set; }


        /// <summary>
        /// <para>Input accumulation raster</para>
        /// <para><xdoc>
        ///   <para>The input flow accumulation raster.</para>
        ///   <para>This can be created with the Flow Accumulation tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入流累积栅格。</para>
        ///   <para>这可以使用流量累积工具创建。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input accumulation raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_accumulation_raster { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output pour point raster where the original pour point locations have been snapped to locations of higher accumulated flow.</para>
        ///   <para>This output is of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出倾点栅格，其中原始倾点位置已捕捉到累积流量较高的位置。</para>
        ///   <para>此输出为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Snap distance</para>
        /// <para>Maximum distance, in map units, to search for a cell of higher accumulated flow.</para>
        /// <para>最大距离（以地图单位表示），用于搜索累积流量较高的像元。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Snap distance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double _snap_distance { get; set; }


        /// <summary>
        /// <para>Pour point field</para>
        /// <para><xdoc>
        ///   <para>The field used to assign values to the pour point locations.</para>
        ///   <para>If the pour point dataset is a raster, use Value.</para>
        ///   <para>If the pour point dataset is a feature, use a numeric field. If the field contains floating-point values, they will be truncated into integers.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于为倾点位置分配值的字段。</para>
        ///   <para>如果倾点数据集为栅格，请使用值。</para>
        ///   <para>如果倾点数据集是要素，请使用数值字段。如果字段包含浮点值，则它们将被截断为整数。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pour point field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _pour_point_field { get; set; } = null;


        public SnapPourPoint SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}